package com.zte.purchase.control;

import com.zte.purchase.model.CPurchase;
import com.zte.sys.login.model.Module;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class ForwardAction {

    @RequestMapping("purchase/lists")
    public String purchaseList(){
        return "purchase/purchase/purchaseList";
    }

    @RequestMapping("purchase/purchase/purchaseAdd")
    public String purchaseAdd(){ return "purchase/purchase/purchaseAdd";}

    @RequestMapping("purchase/purchase/purchaseUpdate/{id}")
    public ModelAndView purchaseUpdate(@PathVariable(value = "id") String id){
        System.out.println("新的="+id);
        ModelAndView modelAndView = new ModelAndView();

        modelAndView.setViewName("purchase/purchase/purchaseUpdate");

        modelAndView.addObject("key", id);
        return modelAndView;
//        return "purchase/purchase/purchaseUpdate";
        }

    @RequestMapping("purchase/purchase/purchaseView")
    public String purchaseView(){ return "purchase/purchase/purchaseView";}

    @RequestMapping("purchaseExamine/lists")
    public String purchaseExamineList(){
        return "purchase/purchaseExamine/purchaseExamineList";
    }

    @RequestMapping("purchaseExamine/examine")
    public String purchaseExamine(){
        return "purchase/purchaseExamine/purchaseExamine";
    }

    @RequestMapping("purchase/cbrand/cblist")
    public String brandList(){
        return "purchase/brand/brandList";
    }

    @RequestMapping("purchase/cbrand/cbadd")
    public String brandAdd(){ return "purchase/brand/brandAdd";}

    @RequestMapping("purchase/cbrand/cbupdate")
    public String brandUpdate(){ return "purchase/brand/brandUpdate";}

    @RequestMapping("purchase/ctype/ctlist")
    public String productTypeList(){
        return "purchase/productType/productTypeList";
    }

    @RequestMapping("purchase/ctype/ctadd")
    public String productTypeAdd(){
        return "purchase/productType/productTypeAdd";
    }

    @RequestMapping("purchase/ctype/ctupdate")
    public String productTypeUpdate(){
        return "purchase/productType/productTypeUpdate";
    }

    @RequestMapping("purchase/cproduct/cplist")
    public String productList(){
        return "purchase/product/productList";
    }

    @RequestMapping("purchase/cproduct/cpadd")
    public String productAdd(){
        return "purchase/product/productAdd";
    }

    @RequestMapping("purchase/cproduct/cpupdate")
    public String productUpdate(){
        return "purchase/product/productUpdate";
    }

    @RequestMapping("purchase/cfirm/cflist")
    public String manufacturerList(){
        return "purchase/manufacturer/manufacturerList";
    }

    @RequestMapping("purchase/cfirm/cfadd")
    public String manufacturerAdd(){
        return "purchase/manufacturer/manufacturerAdd";
    }

    @RequestMapping("purchase/cfirm/cfupdate")
    public String manufacturerUpdate(){
        return "purchase/manufacturer/manufacturerUpdate";
    }

    @RequestMapping("purchase/cfirm/cfview")
    public String manufacturerView(){
        return "purchase/manufacturer/manufacturerView";
    }


}

